package com.easychat.entity.config;

import com.easychat.utils.StringTools;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author 10 2024/10/4
 */
@Component("appConfig")
@Data
public class AppConfig {
    @Value("${ws.port}")
    private Integer wsPort;

    @Value("${project.folder}")
    private String projectFolder;

    @Value("${admin.emails}")
    private String adminEmail;
    public String getProjectFolder(){
        if(StringTools.isEmpty(projectFolder) && !projectFolder.endsWith("/")){
            projectFolder = projectFolder + "/";
        }
        return projectFolder;
    }

}
